///fs Module Driver Interface definitions
//

#ifndef FS_BASIC__MODULE_INC
#define FS_BASIC__MODULE_INC

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <cli.h>
#ifdef linux
#else
#include <openssl/md5.h>
#endif // linux

using namespace std;

class Cfs : private Ccli
{
public:

    Cfs();
    ~Cfs();

    vector<string> get_sub_dirs(string srcdir);
    vector<string> get_these_files(string srcdir, char *ext);
    vector<string> get_all_files(string srcdir);
    void find_these_files(string directory, char *ext, vector<string>*v_target);
    void find_all_files(string directory, vector<string>*v_target);
    size_t num_bytes_in_file(string filename);
    size_t num_lines_in_file(string filename);
    size_t fg_extract_class_objects(string header_filename, vector<string>*pv_classes, vector<string>*pv_class_members);
    int run_unit_test();
    bool fi_isRegularFile(string filename);
    bool fi_isCharacterDevice(string filename);
    void fi_cache_file(string filename);
    bool fi_md5_sum_check(string md5_cached_value, string filename);
    string fi_get_md5_sum(string filename);
    vector <string> fi_read_file_lines(string filename, vector<string> *vres);

    vector<string> v_sub_dirs;
    vector<string> v_cpp_file;
    vector<string> v_feed;
    string feed_filename;
    bool bRecursive, bFoisGras;
    string fi_remove_endl_from_string(string haystack);

    FILE *fp_fi_report;
protected:

private:

    void TestStringOutput(void);
    size_t f01egra5(string cpp_filename);
    void feed();

    size_t error;
    string sresult, sresult_class, sresult_typedef, sresult_function;
    string code_data, filename_backup, system_cmd, md5_sum, md5_sum_check;
    char buff[8192], member_fn_typedef[8192], member_fn_name[8192], st[8192], sf[8192];
    char *scratch_typedef, *scratch_func, *pchar;
    size_t open_brace_cnt, close_brace_cnt, open_bracket_cnt, close_bracket_cnt;
    bool bHasATypedef, bFoisGrasd, bClassFunctionFound;
    FILE *fp_out;

#ifdef linux
#else
    unsigned char md5_result[MD5_DIGEST_LENGTH];
#endif // linux

};

class Cfsnew
{
public:
};

#endif ///FS_BASIC__MODULE_INC









